<?php
session_start();
require 'header.php';
include("connect.php");
$id=$_GET['id'];
$sql="select * from  bookinfo where id='".$id."'";
$sql=mysqli_query($conn,$sql);
$info=mysqli_fetch_array($sql);
$bookname=$info['bookname'];
$file=$info['file'];
$article=$info['article'];
$username=$info['username'];
?>
<div class="container">
	<div class="card ">
	  <div class="card-header">
	   详情与下载
	  </div>
	  <div class="card-body">
		<div class="card mb-3 border border-primary" >
		  <div class="row no-gutters">
		    <div class="col-md-4">
		      <img src="./img/book.jpg" class="card-img">
		    </div>
		    <div class="col-md-8">
		      <div class="card-body">
		        <h5 class="card-title">《<?php echo  $bookname?>》</h5>
		        <p class="card-text"><?php echo  $article?></p>
				  <a href="<?php echo  $file?>" download="book" class="btn btn-primary">点击下载</a>
		        <p class="card-text"><small class="text-muted">发布者：<?php echo  $username?></small></p>
		      </div>
		    </div>
		  </div>
		</div>
	  </div>
	</div>
</div>
</body>